<?php
namespace Seller\Model;
use Think\Model;
class AgentModel extends Model\RelationModel {
    protected $_link = array(

        //收货地址表
        'address'=>array(
            'mapping_type' => self::HAS_MANY,
            'class_name' => 'AgentAddress',
            'foreign_key'   => 'agent_id',
            'as_fields' => 'area,detail_address'
        )


    );
}